package com.yl.order.db.entity;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Transient;
import org.greenrobot.greendao.annotation.Unique;

import java.io.Serializable;

/**
 * create by cjx on 2024/5/28
 * desc:
 */
@Entity
public class CategoryEntity implements Serializable {
    @Transient
    public static final long serialVersionUID = -1L;
    @Id(autoincrement = true)
    private Long id;  //数据库自动增长id

    private int type; // 类型；0：商品分组，1：规格分组, 2:原料分组

    private String parentNumber; // 父编码

    private String name; // 名称
    @Unique
    private String number; // 编码

    private int sort; // 排序

    @Generated(hash = 2048838664)
    public CategoryEntity(Long id, int type, String parentNumber, String name,
            String number, int sort) {
        this.id = id;
        this.type = type;
        this.parentNumber = parentNumber;
        this.name = name;
        this.number = number;
        this.sort = sort;
    }

    @Generated(hash = 725894750)
    public CategoryEntity() {
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public int getType() {
        return this.type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getParentNumber() {
        return this.parentNumber;
    }

    public void setParentNumber(String parentNumber) {
        this.parentNumber = parentNumber;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNumber() {
        return this.number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public int getSort() {
        return this.sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

}
